package cn.yunbamboos.mybatis.metadata;

import cn.yunbamboos.mybatis.annotation.OrderBy;
import cn.yunbamboos.mybatis.annotation.TableField;

import java.lang.reflect.Field;

public class TableOrderInfo extends BaseInfo {

    private final boolean asc;

    public TableOrderInfo(Field field, TableField column, OrderBy order){
        super(field, column.value(), field.getName(), field.getType(), column.whereStrategy(), order.sort());
        this.asc = order.asc();
    }

    public boolean isAsc() {
        return asc;
    }
}
